<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Card</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock.js" TYPE="text/javascript"
></SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Card</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Representation and functions on playing cards.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AT"
>T</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3ARank"
>Rank</A
> = Integer</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3ASuit"
>Suit</A
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AHeart"
>Heart</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AClub"
>Club</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADiamond"
>Diamond</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ASpade"
>Spade</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Acard"
>card</A
> :: <A HREF="Card.html#t%3ASuit"
>Suit</A
> -&gt; <A HREF="Card.html#t%3ARank"
>Rank</A
> -&gt; <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asuit"
>suit</A
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Arank"
>rank</A
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; <A HREF="Card.html#t%3ARank"
>Rank</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArankName"
>rankName</A
> :: <A HREF="Card.html#t%3ARank"
>Rank</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Avalid"
>valid</A
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; Bool</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aparse"
>parse</A
> :: String -&gt; Maybe <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AT"
></A
><B
>T</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:T')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:T" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Eq <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t%3ARank"
></A
><B
>Rank</B
> = Integer</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3ASuit"
></A
><B
>Suit</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v%3AHeart"
></A
><B
>Heart</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3AClub"
></A
><B
>Club</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ADiamond"
></A
><B
>Diamond</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ASpade"
></A
><B
>Spade</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Suit')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Suit" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Arbitrary <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="decl"
>Bounded <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="decl"
>Enum <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Acard"
></A
><B
>card</B
> :: <A HREF="Card.html#t%3ASuit"
>Suit</A
> -&gt; <A HREF="Card.html#t%3ARank"
>Rank</A
> -&gt; <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Exported function to contruct a card.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Asuit"
></A
><B
>suit</B
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; <A HREF="Card.html#t%3ASuit"
>Suit</A
></TD
></TR
><TR
><TD CLASS="doc"
>Gets the suit out of a Card.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Arank"
></A
><B
>rank</B
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; <A HREF="Card.html#t%3ARank"
>Rank</A
></TD
></TR
><TR
><TD CLASS="doc"
>Gets the rank out of a Card.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3ArankName"
></A
><B
>rankName</B
> :: <A HREF="Card.html#t%3ARank"
>Rank</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="doc"
>String representations of ranks.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Avalid"
></A
><B
>valid</B
> :: <A HREF="Card.html#t%3AT"
>T</A
> -&gt; Bool</TD
></TR
><TR
><TD CLASS="doc"
>Tests if the rank of a card is valid, suit is by definition valid.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aparse"
></A
><B
>parse</B
> :: String -&gt; Maybe <A HREF="Card.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Parse the short representation of a card into the card type.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 0.8</TD
></TR
></TABLE
></BODY
></HTML
>
